home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / powerup / ppclib / ppc.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  2KB  |  107 lines

  1. #ifndef POWERUP_PPCLIB_PPC_H
  2. #define POWERUP_PPCLIB_PPC_H
  3.  
  4. /* PPCGetInfo() Tags */
  5.  
  6. #define    PPCINFOTAG_Dummy        (TAG_USER + 0x1f000)
  7.  
  8. /* Version of the CPU
  9.  * (Get)
  10.  */
  11. #define    PPCINFOTAG_CPU            (PPCINFOTAG_Dummy + 0x1)
  12.  
  13. /* CPU Count
  14.  * (Get)
  15.  */
  16. #define    PPCINFOTAG_CPUCOUNT        (PPCINFOTAG_Dummy + 0x2)
  17.  
  18. /* Clock of the CPU
  19.  * (Get)
  20.  */
  21. #define    PPCINFOTAG_CPUCLOCK        (PPCINFOTAG_Dummy + 0x3)
  22.  
  23. /* Revision of the CPU
  24.  * (Get)
  25.  */
  26. #define    PPCINFOTAG_CPUREV        (PPCINFOTAG_Dummy + 0x4)
  27.  
  28. /* Default ExceptionHook
  29.  * If you want to install an ExceptionHook
  30.  * to catch all exceptions by a debugger for example
  31.  * (Get/Set)
  32.  */
  33. #define    PPCINFOTAG_EXCEPTIONHOOK    (PPCINFOTAG_Dummy + 0x5)
  34.  
  35. /* Add PPCCreateTask Hook (V45)
  36.  * If you want to be notified when a new PPC Task
  37.  * is created. Usable for a debugger or a Task Viewer.
  38.  *
  39.  * BOOL CallHookPkt(YourHookHook, TaskObject, TaskHookMsg);
  40.  *
  41.  * If you want to install a new TrapHandler you can do it
  42.  * now in your Hook function. Or tell the Task to stop at the
  43.  * first instruction.
  44.  * The PPC Task is initiated after all Hook functions complete.
  45.  * The result defines if potential hooks should not be called.
  46.  * If you return TRUE no other hooks are called.
  47.  * (Set)
  48.  */
  49. #define    PPCINFOTAG_TASKHOOK    (PPCINFOTAG_Dummy + 0x6)
  50.  
  51. /* Remove a TaskHook (V45)
  52.  * (Set)
  53.  */
  54. #define    PPCINFOTAG_REMTASKHOOK    (PPCINFOTAG_Dummy + 0x7)
  55.  
  56. /* PLL Devider of the CPU (V45)
  57.  * (Get)
  58.  */
  59. #define    PPCINFOTAG_CPUPLL    (PPCINFOTAG_Dummy + 0x8)
  60.  
  61.  
  62.  
  63.  
  64. struct TaskHookMsg_Create
  65. {
  66.     ULONG        MethodID;
  67.     ULONG        Version;
  68.     void        *ElfObject;
  69.     struct TagItem    *Tags;
  70. };
  71.  
  72. struct TaskHookMsg_Delete
  73. {
  74.     ULONG        MethodID;
  75.     ULONG        Version;
  76. };
  77.  
  78. struct TaskHookMsg_Get
  79. {
  80.     ULONG        MethodID;
  81.     ULONG        Version;
  82.     struct TagItem    *Tags;
  83. };
  84.  
  85. struct TaskHookMsg_Set
  86. {
  87.     ULONG        MethodID;
  88.     ULONG        Version;
  89.     struct TagItem    *Tags;
  90. };
  91.  
  92. #define    PPCTASKHOOKMETHOD_CREATE    0
  93. #define    PPCTASKHOOKMETHOD_DELETE    1
  94. #define    PPCTASKHOOKMETHOD_GET        2
  95. #define    PPCTASKHOOKMETHOD_SET        3
  96.  
  97.  
  98. /* Current known PowerPC CPU versions */
  99. #define    CPU_603        3
  100. #define    CPU_604        4
  101. #define    CPU_602        5
  102. #define    CPU_603e    6
  103. #define    CPU_603p    7
  104. #define    CPU_604e    9
  105.  
  106. #endif
  107.